package com.hoshing.test.controller;


import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hoshing.test.entity.TShop;
import com.hoshing.test.entity.TUser;
import com.hoshing.test.service.ITShopService;
import com.hoshing.test.service.ITUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hskj
 * @since 2021-12-24
 */
@RestController
@RequestMapping("/test/shop")
public class TShopController {

    @Autowired
    ITShopService shopService;

    @GetMapping("getAll")
    public String getAll(){
        QueryWrapper<TShop> queryWrapper = new QueryWrapper<>();
        List<TShop> datas = shopService.list(queryWrapper);
        return JSONObject.toJSONString(datas);
    }
}

